﻿
using UnityEngine;
namespace FrameWorkSong
{
    public enum EnviromentMode
    {
        开发,
        测试,
        发布,
    }
    public abstract class MianManagers:MonoBehaviour
    {
        public EnviromentMode mode;

        private static EnviromentMode mShareMode;
        private static bool mModeSetted = false;

         void Start()
        {
            //初始运行，设置模式，后面的场景不会更改
            if (!mModeSetted)
            {
                mShareMode = mode;
                mModeSetted = true;
            }

            switch (mShareMode)
            {
                case EnviromentMode.开发:
                    LaunchInDevelopingMode();
                    break;
                case EnviromentMode.测试:
                    LaunchInTestMode();
                    break;
                case EnviromentMode.发布:
                    LaunchInProductionMode();
                    break;
            }
        }
        protected abstract void LaunchInDevelopingMode();
        protected abstract void LaunchInTestMode();
        protected abstract void LaunchInProductionMode();
    }
}

